Added in #2847 this ended up unfortunately breaking the `regex` crate on
nightly, so let's just issue a warning for awhile first. Eventually we can
promote this to an error if it becomes a problem.
}
if let Err(e) = unique_build_targets(&targets, layout) {
- bail!("duplicate build target found: `{}`", e);
+ warnings.push(format!("file found to be present in multiple \
+ build targets: {}", e));
}
let mut deps = Vec::new();
[dependencies]
"#)
.file("src/main.rs", r#"
+ #![allow(warnings)]
fn main() {}
"#);
- let error_message = format!("\
-[ERROR] failed to parse manifest at `[..]`
-
-Caused by:
- duplicate build target found: `{}`",
- p.root().join("src[..]main.rs").display());
-
assert_that(p.cargo_process("build"),
execs()
- .with_status(101)
- .with_stderr(error_message)
- )
+ .with_status(0)
+ .with_stderr("\
+warning: file found to be present in multiple build targets: [..]main.rs
+[COMPILING] foo v0.0.1 ([..])
+[FINISHED] [..]
+"));
}
#[test]